Release 10.1A: OpenEdge Development:
Progress Dynamics Administration
DCU driver files
The configuration file specifies another file, the DCU driver file. That file contains the information needed to set up the DCU’s wizard interface. You cannot use more than one DCU driver file during a DCU session.
Examine the default DCU driver file,
setup1000B.xml. To customize the DCU for your own deployments, you can use the existing file as a template to add your own messages and other data. The beginning of the file contains basic information including messages and system information that will be useful gathering information during setup, as shown in the following example:
The
<registrykey>nodes point the DCU to the Windows Registry for needed information. As shown by the<path>node, the information can then be used to derive other needed values. The Configuration File Manager parses the XML in a single pass. Therefore, the order of the nodes is important. The parser cannot expand a token if a node uses that token before the node that supplies the data is parsed.Page nodes
The DCU driver file also contains the description of each page that the DCU displays and defines the actions that can occur on those pages. The following excerpt describes the DCU’s
InstallationPathspage:
Note that the page is named and belongs to a named group. All the pages that cover a certain task should belong to the same group. The DCU uses the page name to target the correct page when an action is invoked. Because the pages are called by name, their nodes do not need to be listed in any order. This flexibility makes it easier for you to reuse individual pages in different sequences for different setup types. The
<Proc>node gives the filename for the page. Each DCU page is created from the template,src/install/intmplframe.w.Action nodes
Each
<control>node describes an object on the page and how it behaves. The previous excerpt shows the description of the editor that appears in the page frame. The following excerpt shows the description of a Cancel button:
The
<action>node describes how a control reacts to one of the standard Progress 4GL events, which is listed in the<Event>subnode. The<Action>subnode can only contain a single character string, the name of the API that is launched by the event. The DCU assumes that the API is in the Install UI Manager by default. If you want to run an API from another manager, you can specify the manager using an<ActionTarget>node. The value in<ActionTarget>must match the named assigned to the manager in the<cManagerName>node in the DCU configuration file.The DCU recognizes two special keywords in addition to any APIs in the managers:
QUITandFINISH.QUITends the DCU session without completing the upgrade.FINISHends the DCU and signals that the upgrade completed successfully. The difference is important for release versioning.While most actions are linked to events for specific controls, you can also attach actions directly to a page. The following excerpt shows an event linked directly to the
GetICFDBParamspage:
Action parameters
The following excerpt shows the description for the Back button on the
InstallationPathspage, and its two actions are processed in the order in which they are listed:
The second action shows an example of passing a parameter. In this excerpt, it is the name of the page that the DCU will display when the Back button is chosen. An action can only take a single parameter, which must be a character string.
However, the DCU recognizes two special strings for passing conditional parameters. These strings allow you to embed
IF...THEN...ELSEandCASEexpressions in the XML. Table 5–3 lists the operators that you can use in the expressions.
Table 5–3: Operators for conditional expressions Operator Symbol AND OR Equals Greater than or equal Less than or equal Not equal
An example of the syntax for an
IFexpression is shown in this excerpt from theGetICFDBParamspage:
The
Note: While you can create complexIFexpression begins with a question mark (?) followed by the expression the DCU evaluates. Semicolons (;) separate the results. The value after the first semicolon is theTHENresult, and the value after the second semicolon is theELSEresult. So, the expression above reads, “If the value ofdb_build_icfdbisYES, then go to theGetICFSiteDatapage, else go to theGetICFDBPatchespage.”IFexpressions using the available operators, you cannot nestIFexpressions. The results must be single-character strings, as with normal parameters.An example of the syntax for a
CASEexpression is shown below:
The
CASEexpression begins with a colon (:) and the name of the property to evaluate. Each result begins with a colon followed by a pipe (|) delimited value pair. The DCU uses the first value pair that matches the evaluated property in the list of results. So, the expression above reads, “Check thesession_date_formatproperty. If the value isdmy, go topage1. If the value ismdy, go topage2. If the value isymd, go topage3. If none of the conditions are met, go topage9.”Data capture nodes
The DCU captures data from its wizard interface with a screen scrape procedure. How the data is stored is controlled through the use of two nodes:
<StoreTo>and<TableVariable>. The following excerpt shows a fill-in field description that employs both methods:
Which method you use to capture the data depends on when you want to have the data available. The DCU stores the data from a
<StoreTo>node in a session parameter. The parameter can be defined in either the Configuration File Manager or in the DCU driver file. The data is then available to the DCU while the user steps through the rest of the wizard pages. The DCU stores the data from a<TableVariable>node in a temp-table. The data in the temp-table is used after the DCU has finished collecting data and starts processing. As the example shows, you can store the data in both places if you need it both before and after the DCU begins processing.Database nodes
The last section of the standard DCU driver file describes the databases to upgrade. Each database has its own node. The DCU works through the databases in the order they are listed here. A database node specifies the information needed to connect to the database and lists a set of XML files that contain descriptions of the upgrades and datasets to be applied to the database.
The following excerpt shows the contents of a database node:
This example shows the information for setting up the Repository. It is recommended that you use the same technique for tracking the database version for your application databases. To enable identification of the current version of a database, each database requires a sequence with a name in the following format:
Where
logicaldbnameis the logical database name for the database.This sequence tracks the version of the database as a six-digit integer. The first two digits are the version. The next two digits are the revision level. The final two digits are the patch level.
The current value of the sequence is not used, but the DCU reads the sequence maximum value to determine the current database version. The DCU uses this value to decide which patches must be applied to the target database to complete the upgrade. When a database definition delta file is loaded, the database definition should update the sequence definition to its new maximum value. The
<MinimumVersion>node contains the minimum version of the database on which a particular setup can run.The remaining nodes list the patch levels to apply during this upgrade. The associated files detail all the patch programs and ADOs that are part of a particular deployment. Notice that they are listed in ascending order by patch levels. Your files should always be listed in this order. The DCU reads the files in the order they are listed to build the temp-table of patches.
|
Copyright © 2005 Progress Software Corporation www.progress.com Voice: (781) 280-4000 Fax: (781) 280-4095 |